package com.bestcem.xm.txtanls.dao;

import com.bestcem.xm.txtanls.entity.mysql.JoinInfoViewpointEntity;
import com.bestcem.xm.txtanls.entity.pojo.JoinInfoViewpointDO;

import java.util.List;

/**
 * JoinInfoDao。存储原话对应的观点及情感
 *
 * @author jy.zhao
 * @version 1.0
 * @date 2021/5/13 13:57
 **/
public interface JoinInfoDao {


    /**
     * 查询原话记录id对应的所有原话记录。
     *
     * @param projectId 项目id
     * @param recordIds 原话记录id
     * @return List<JoinInfoEntity>
     * @author jy.zhao
     * @date 2021/5/13 13:58
     **/
    List<JoinInfoViewpointDO> listJoinInfos(String projectId, List<String> recordIds);

    /**
     * 训练结果保存
     *
     * @return String
     * @author gy.liu
     * @date 2021/5/14
     */
    void insertJoinInfo(List<JoinInfoViewpointEntity> joinInfoViewpointEntities);

//    /**
//     * 根据原话id查询原话情感分析记录
//     *
//     * @param recordId 原话id
//     * @return 情感分析记录list
//     * @author liheng
//     * @date 2021/5/18 20:54
//     */
//    List<JoinInfoViewpointDO> listByRecordId(String recordId);

    /**
     * 删除分析项目下的全部 join info
     *
     * @param projectId 项目id
     * @return The result of a delete operation
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/5/21 14:29
     */
    boolean deleteProjectAllJoinInfo(String projectId);


    /**
     * @param oldProjectId
     * @return
     */
    List<JoinInfoViewpointDO> listByProjectId(String oldProjectId);

    /**
     * 查询命中观点id的所有joinInfo中的recordId
     *
     * @param viewpointIds 观点id
     * @param projectId    分析项目id
     * @return
     */
    List<String> listIdByViewpointId(List<String> viewpointIds, String projectId, Integer viewpointScore, Boolean isParent);
}

